<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script type="text/javascript">
    function page(n,s){
        $("#pageNo").val(n);
        $("#pageSize").val(s);
        $("#searchForm").submit();
        return false;
    }
</script>
<div class="content-wrap">
    <div class="wrapper" style="bottom: 50px;">
        <ul class="nav nav-tabs">
            <li class="active">
                <a href="#"   onclick="loadDiv('mainCenterDiv','${ctx}/drug/drugSupplierCata/index')">药品厂商列表</a>
            </li>
            <li>
                <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/drug/drugSupplierCata/form')">药品厂商添加</a>
            </li>
        </ul>
        <section class="panel panel-default">
            <div class="panel-body">
                <div class="table-responsive no-border">
                    <div class="datatable-top">
                        <div class="pull-left">
                            <form:form id="searchForm" modelAttribute="drugSupplierCata"  onsubmit="return loadDivForm('mainCenterDiv','searchForm','${ctx}/drug/drugSupplierCata/index');" method="post" class="form-inline">
                                <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                                <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                                <label>厂商类别:&nbsp;&nbsp;</label>
                                <form:select path="supplierClass" class="form-control" data-parsley-required="true">
                                    <form:option value="" label=""/>
                                    <form:options items="${fns:getDictList('SUPPLIER_CLASS')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                                </form:select>
                                <div class="form-group"><label>输入码:&nbsp;&nbsp;</label><form:input path="inputCode" maxlength="50" class="form-control"></form:input></div>
                                <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
                            </form:form>
                        </div>
                    </div>
                    <table id="contentTable" class="table table-bordered mg-t datatable">
                        <thead>
                        <tr>
                            <th>供应商别名</th>
                            <th>厂商</th>
                            <th>厂商类别</th>
                            <th>输入码</th>
                            <th>注册商标</th>
                            <th>是否国外</th>
                            <th>是否使用</th>
                            <th>备注信息</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${page.list}" var="drugSupplierCata">
                        <tr>
                            <td> ${drugSupplierCata.supplierJc}</td>
                            <td> ${drugSupplierCata.supplierName}</td>
                            <td> ${fns:getDictLabels(drugSupplierCata.supplierClass, 'SUPPLIER_CLASS', '')}</td>
                            <td> ${drugSupplierCata.inputCode}</td>
                            <td> ${drugSupplierCata.trademark}</td>
                            <td> ${fns:getDictLabels(drugSupplierCata.foreignx, 'YES_NO', '')}</td>
                            <td> ${fns:getDictLabels(drugSupplierCata.usedFlag, 'YES_NO', '')}</td>
                            <td> ${drugSupplierCata.remarks}</td>
                            <td>
                                <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/drug/drugSupplierCata/form?id=${drugSupplierCata.id}')" class="btn btn-success btn-xs">修改</a>
                            </td>
                        </tr>

                        </c:forEach>

                    </table>
                    <div class="pagination">${page}</div>
                </div>
            </div>
        </section>
    </div>
</div>